﻿// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(function () {
    "use strict";

    WinJS.Binding.optimizeBindingReferences = true;

    var app = WinJS.Application;
    var activation = Windows.ApplicationModel.Activation;

    app.onactivated = function (args) {
        if (args.detail.kind === activation.ActivationKind.launch) {
            if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
                
            } else {
            }
            args.setPromise(WinJS.UI.processAll());
        }

        var playButton = document.getElementById("play-button");

        playButton.onclick = function () {
            var nameInput = document.getElementById("name-input");
            var username = nameInput.value;
            if (username) {
                gameStates.user = username;
                localStorage["user"] = username;
            }
            else {
                localStorage["user"] = "Anonymous";
            }
        };
    };
    app.start();
})();
